<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="static/css/admin/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="static/js/jquery.js"></script>
<link rel="stylesheet" href="admin/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="admin/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="admin/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript" src="static/js/Validform_v5.3.2_min.js"></script>
<script>
	$(function() {
		//表单验证
		$(".paraform").Validform({
			tiptype:3
		});
	});
	KindEditor.ready(function(K) {
		var editor = K.editor({
			uploadJson : '<{$adminpage}>?m=upload',
			fileManagerJson : '<{$adminpage}>?m=upload_manager',
			allowFileManager : true
		});
		K('#image1').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					imageUrl : K('#url1').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#url1').val(url);
						editor.hideDialog();
					}
				});
			});
		});
	});
	function show(typeid){
		if(typeid==1){		
	     document.getElementById("type_value").style.display="none";
		}else if(typeid==2)
		{
			 document.getElementById("type_value").style.display="none";
		}else if(typeid==3)
		{
			 document.getElementById("type_value").style.display="";
		}else  if(typeid==4)
		{
			 document.getElementById("type_value").style.display="none";
		}
		else{
		    document.getElementById("type_value").style.display="";
			}
	}
</script>
</head>
</head>
<body>
<div class="colorarea01">
	<div class="search clearfix">
		<div class="searchL">
			<ul class="menulist">
				<li><a href="<{$adminpage}>?m=selfdefine&a=list" class="list">返回参数列表</a></li>
			</ul>
		</div>
	</div>
	<form name="form1" class="paraform" method="post"  enctype="multipart/form-data"  action="<{$adminpage}>?m=selfdefine">
		<table cellspacing="0" cellpadding="0" width="100%"  class="maintable">
          <tr>
			  <th>参数类型：</th>
			  <td><input type="radio" id="input" name="type_name" value="input" checked onclick="show(1)"
                  <{if $paralist.type_name=='input'}>checked<{/if}>> 文本框 &nbsp;&nbsp;
                  <input type="radio" name="type_name" id="textarea" value="textarea" onclick="show(2)" 
                  <{if $paralist.type_name=='textarea'}>checked<{/if}>> 多行文本框 &nbsp;&nbsp; 
                  <input type="radio" name="type_name" id="select"  value="select" id="" onclick="show(3)"
                  <{if $paralist.type_name=='select'}>checked<{/if}>> 下拉框 &nbsp;&nbsp; 
                  <input type="radio" name="type_name" id="time" value="time" onclick="show(4)" 
                  <{if $paralist.type_name=='time'}>checked<{/if}>> 时间 &nbsp;&nbsp; 
                  <input type="radio" name="type_name" value="checkbox"  id="checkbox" onclick="show(5)" 
                  <{if $paralist.type_name=='checkbox'}>checked<{/if}>> 复选框 </td></tr>
		  <tr>
			  <th>参数名称：</th>
			  <td><input name="c_name" type="text"  id="c_name" size="30" value="<{$paralist.c_name}>" datatype="s" nullmsg="请填写参数名称！"/>
              </td>
		  </tr>
          <tr  id="type_value"     <{if $paralist.type_name=='select'|| $paralist.type_name=='checkbox'}>  style="display:" <{else}> style="display:none;"<{/if}>>
			  <th>参数内容：</th>
			  <td>
              <textarea name="type_value" ><{$paralist.type_value}></textarea><font color="#FF0000">请用｜隔开参数,例如1|2|3|4</font></td>
	      </tr>
		  <tr>
			  <th></th>
			  <td><div class="buttons">
						<input type="submit" name="thevaluesubmit" value="提交保存" class="submit">            
						<input type="hidden" name="a" value="<{$ac}>">
						<input type="hidden" name="id" value="<{$paralist.id}>">
						<input name="valuesubmit" type="hidden" value="yes" />
				 </div>
              </td>
			</tr>
		</table>
	</form>
</div>
</body>
</html>